home *** CD-ROM | disk | FTP | other *** search
Java Source | 1997-06-19 | 1.6 KB | 71 lines |
- /*
- *
- * 2 12/20/96 2:18a Tjones
- * Changed empty constructor for jblender
- *
- * 1 11/25/96 10:48a Cthrons
- */
-
- package symantec.itools.db.awt;
-
- // import java.awt.*;
- import java.util.*;
- import symjava.sql.*;
- import java.lang.*;
- import symantec.itools.db.net.*;
- import symantec.itools.db.pro.*;
-
- /**
- * A TextField object is a single-line area that displays text.
- * It can be bound to a projection in a database.
- * It can be set to allow editing or read-only modes.
- *
- */
- public class RecordNumberLabel extends java.awt.Label implements RecordLink
- {
- /**
- * The ProjBinder object which this component can use to get data from
- * the server, or change data at the database server.
- */
- ProjBinder m_ProjBinder;
-
- /**
- * Constructs a new TextField.
- */
- public RecordNumberLabel()
- {
- super("<Record Number Label>");
- }
-
- /**
- * Called when the object is bound to a RelationView
- *
- */
- public void init ()
- {
- setText("Invalid");
- }
-
- /**
- * Called when the current Record in a Relationview is changed.
- */
- public void notifyRecordChange (Record currentRecord)throws SQLException
- {
- if (currentRecord != null && currentRecord.getRelationView() != null)
- {
- setText(currentRecord.getRelationView().getCurrentRecordNumberString());
- }
- }
-
- public void setRelationView (RelationView rv)
- {
- try
- {
- rv.bindCurrentRecord(this);
- }
- catch (SQLException ex)
- {
- System.out.println(ex.getMessage());
- }
- }
- }